﻿namespace Papyrus.Web.Models
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using Papyrus.Web.Models.Entities;

    public class LoanRepository : ILoanRepository
    {
        public Loan RetrieveLoan(Guid loanId)
        {
            if (loanId == default(Guid))
            {
                throw new ArgumentNullException("loanId");
            }

            using (var context = new Entities.Entities())
            {
                return context.Loans.SingleOrDefault(l => l.id == loanId);
            }
        }


        public void SaveLoan(Loan loan)
        {
            throw new NotImplementedException();
        }
    }
}